"""转换为客户页面"""
from page.base_page import BasePage
from selenium.webdriver.common.by import By

class SwitchToCustomerPage(BasePage):
    url = '/index.php?m=customer&a=add&leads_id=1775'
    #客户名
    custom_name_locator = (By.ID,'name')
    # 保存
    bnt_save_locator = (By.CSS_SELECTOR, '#form1 > table > tfoot > tr > td > input:nth-child(1)')

    def input_customer_name(self,customer_name):
        #转换为客户
        self.driver.find_element(*self.custom_name_locator).send_keys(customer_name)

    def click_btn_save(self):
        #保存
        self.driver.find_element(*self.bnt_save_locator).click()